﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="direct.aspx.cs" Inherits="appleader_weight_direct" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>直接赋权</title>
    <link href="../../css/main.css" rel="stylesheet" type="text/css" />
    </head>
<body>
    <form id="form1" runat="server">
    <div>
    
        <div id="content">
         <div>
             <asp:Image ID="Image1" runat="server" ImageUrl="~/images/arrowRight.png" />
             <% if (Request.QueryString[0] != null)
                {
                    Response.Write("<a href='../projects/addmission.aspx?projectid=" + Request.QueryString[0].ToString() + "'>返回。。。</a><hr />");
                } %>
            <asp:SqlDataSource ID="SqlDataSource1" runat="server" 
                ConnectionString="<%$ ConnectionStrings:appConnectionString %>" 
                
                 SelectCommand="SELECT [rule].ruleid, [rule].rulename FROM [rule] INNER JOIN model ON [rule].modelid = model.modelid INNER JOIN project ON model.modelid = project.modelid WHERE (project.projectid = @projectid) ORDER BY [rule].ruleid DESC">
                <SelectParameters>
                    <asp:QueryStringParameter Name="projectid" QueryStringField="projectid" />
                </SelectParameters>
            </asp:SqlDataSource>
            <asp:GridView ID="GridView1" runat="server" 
                AutoGenerateColumns="False" CellPadding="4" DataKeyNames="ruleid" 
                DataSourceID="SqlDataSource1" ForeColor="#333333" GridLines="None" PageSize="5" 
                Width="100%">
                <FooterStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
                <RowStyle BackColor="#F7F6F3" ForeColor="#333333" />
                <Columns>
                    <asp:TemplateField HeaderText="" InsertVisible="False" 
                        SortExpression="ruleid">
                        <EditItemTemplate>
                            <asp:Label ID="Label1" runat="server" Text='<%# Eval("ruleid") %>' Visible="false"></asp:Label>
                        </EditItemTemplate>
                        <ItemTemplate>
                            <asp:Label ID="Label1" runat="server" Text='<%# Bind("ruleid") %>' Visible="false"></asp:Label>
                        </ItemTemplate>
                        <ItemStyle Width="5px" />
                    </asp:TemplateField>
                    <asp:BoundField DataField="rulename" HeaderText="准则名称" 
                        SortExpression="rulename" />
                    <asp:TemplateField HeaderText="当前权值">
                        <ItemTemplate>
                            <asp:Label ID="lb_cur" runat="server" Text=""></asp:Label>
                        </ItemTemplate>
                        <ItemStyle HorizontalAlign="Center" Width="80px"></ItemStyle>
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="权值（0-100之间）" ItemStyle-Width="120px">
                        <ItemTemplate>
                            <asp:TextBox ID="TextBox1" runat="server"></asp:TextBox>
                        </ItemTemplate>

<ItemStyle Width="120px"></ItemStyle>
                    </asp:TemplateField>
                    <asp:HyperLinkField DataNavigateUrlFields="ruleid" 
                        DataNavigateUrlFormatString="directToIndi.aspx?ruleid={0}" HeaderText="指标权值" 
                        Text="相应指标">
                        <ItemStyle CssClass="bacimg1" HorizontalAlign="Right" Width="67px" />
                    </asp:HyperLinkField>
                </Columns>
                <PagerStyle ForeColor="#003399" HorizontalAlign="Center" />
                <SelectedRowStyle BackColor="#E2DED6" Font-Bold="True" ForeColor="#333333" />
                <HeaderStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
                <EditRowStyle BackColor="#999999" />
                <AlternatingRowStyle BackColor="White" ForeColor="#284775" />
            </asp:GridView>
            </div>
            
            
            <div style="text-align: center; float:left; width:100%;">
                <asp:ImageButton ID="ImageButton1" runat="server" 
                    ImageUrl="~/images/submit.gif" onclick="ImageButton1_Click" />
            </div>
        </div>
    
    </div>
    </form>
</body>
</html>
